package com.fegin.bean.admin;

import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 角色表
 * </p>
 *
 * @author 张子艺
 * @since 2019-01-24
 */
@TableName("admin_role")
public class AdminRole extends Model<AdminRole> {

    private static final long serialVersionUID = 1L;

	private Long id;
	@TableField("role_parent_id")
	private Long roleParentId;
    /**
     * 角色名
     */
	@TableField("role_name")
	private String roleName;
    /**
     * 角色编码
     */
	@TableField("role_value")
	private String roleValue;
    /**
     * 创建时间
     */
	@TableField("create_time")
	private Long createTime;
    /**
     * 角色描述
     */
	private String details;
    /**
     * 1:最后一级代理，可创建会员，0:不是最后一级
     */
	@TableField("is_last")
	private Integer isLast;
    /**
     * 所属管理员下级管理员角色
     */
	@TableField("admin_user_id")
	private Long adminUserId;
	private Date timestamp;

	@TableField(exist = false)
	private List<MenuResourse> menuResourses;

	public List<MenuResourse> getMenuResourses() {
		return menuResourses;
	}

	public void setMenuResourses(List<MenuResourse> menuResourses) {
		this.menuResourses = menuResourses;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getRoleParentId() {
		return roleParentId;
	}

	public void setRoleParentId(Long roleParentId) {
		this.roleParentId = roleParentId;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getRoleValue() {
		return roleValue;
	}

	public void setRoleValue(String roleValue) {
		this.roleValue = roleValue;
	}

	public Long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Long createTime) {
		this.createTime = createTime;
	}

	public String getDetails() {
		return details;
	}

	public void setDetails(String details) {
		this.details = details;
	}

	public Integer getIsLast() {
		return isLast;
	}

	public void setIsLast(Integer isLast) {
		this.isLast = isLast;
	}

	public Long getAdminUserId() {
		return adminUserId;
	}

	public void setAdminUserId(Long adminUserId) {
		this.adminUserId = adminUserId;
	}

	public Date getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(Date timestamp) {
		this.timestamp = timestamp;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "AdminRole{" +
			"id=" + id +
			", roleParentId=" + roleParentId +
			", roleName=" + roleName +
			", roleValue=" + roleValue +
			", createTime=" + createTime +
			", details=" + details +
			", isLast=" + isLast +
			", adminUserId=" + adminUserId +
			", timestamp=" + timestamp +
			"}";
	}
}
